package com.dyh.controller.admin;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/admin")
public class IndexController {

    @RequestMapping({"","/index"})
    String index(){
        return "admin/index";
    }


    @RequestMapping("/logout")
    public String logout(HttpSession session){

        session.invalidate();

        return "redirect:../";
    }


}
